<template>
  <div id="login">
    <el-form :model="form" label-width="60px">
      <el-form-item label="账号">
        <el-input v-model="form.name" />
      </el-form-item>
      <el-form-item label="密码">
        <el-input type="password" v-model="form.password" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">登录</el-button>
      </el-form-item>
  </el-form>
  </div>
</template>

<script setup lang='ts'>
import { ref, reactive } from 'vue'
import { useRouter } from "vue-router";
const router = useRouter()
const form = reactive({
  name: '',
  password: '',
})

const onSubmit = () => {
  console.log('submit!')
  router.push('/home/project')
}
</script>
<style scoped>
#login{
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}
.el-form{
  width: 30%;
}
  .el-button{
    width: 100%;

  }
 
</style>